<?php echo $html->docType('html4-trans'); ?> 
<html dir="ltr" xml:lang="es" lang="es-CL"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:og="http://opengraphprotocol.org/schema/"
	xmlns:fb="http://developers.facebook.com/schema/"
	>
<head>
  <?php echo $html->charset(); ?> 
  <title><?php echo sprintf('%sPlasa Market Place', $title_for_layout . ' &middot; '); ?></title>
  <?php echo $html->meta('description', 'Plasa.cl - El mejor lugar para comprar en linea.'); ?> 
  <?php echo $html->meta('keywords', 'plasa de compras, catalogo, tienda, vestuario, tecnología, industrias, automoviles, juegos, consolas'); ?>
   
  <meta name="language" content="es"/>
  <meta name="author" content="Plasa Inc"/>
  <meta name="googlebot" content="index,follow" />
  <meta name="robots" content="index,follow"/>
  <meta name="revisit-after" content="1 day" />
  
  <link rel="Portada" title="Plasa Market Place" href="<?php echo $html->url('/', true); ?>" />
  <link rel="Directorio" title="Directorio" href="<?php echo $html->url(array('controller' => 'directory', 'action' => 'index'), true); ?>" />
  <link rel="Popular" title="Popular" href="<?php echo $html->url(array('controller' => 'popular', 'action' => 'index'), true); ?>" />
  <link rel="Como Funciona" title="Como Funciona" href="<?php echo $html->url(array('controller' => 'pages', 'action' => 'display', 'how-it-works'), true); ?>" />
  <link rel="Blog" title="Blog" href="<?php echo Configure::read('Plasa.Url.blog'); ?>" />
  <link rel="Nosotros" title="Nosotros" href="<?php echo $html->url(array('controller' => 'pages', 'action' => 'display', 'about'), true); ?>" />
  
  <link rel="search" type="application/opensearchdescription+xml" href="<?php echo $html->url('/opensearch.xml', true); ?>" title="Plasa Market Place" />
  
  <?php echo $html->meta('icon', $html->url('/favicon.ico', true), array('type' => 'icon')); ?> 
  <?php echo $html->meta(__('Productos', true), array('controller' => 'rss', 'products'), array('type' => 'rss')); ?> 
  <?php echo $html->meta(__('Novedades', true), array('controller' => 'rss', 'news'), array('type' => 'rss')); ?>
  
  <script type="text/javascript">
    var WWW_BASE = '<?php echo $this->webroot; ?>';
  </script>
  <?php echo $javascript->link(array($jscript['jquery'], $jscript['qtip'], '/static/js/commons')); ?> 
  <?php echo $html->css(array('/static/css/base', '/static/css/plasa'), null, array('media' => 'screen,projection')); ?> 
  <!--[if lte IE 8]><?php echo $html->css('/static/css/plasa-ie'); ?><![endif]-->
  <?php echo $scripts_for_layout; ?>
</head>
<body>

<?php echo $session->flash();?>
<div id="loading-bar"><?php __('Cargando...'); ?></div>

<div id="container">
	<div id="inner">

<?php
	/**
	 * Load HTML Header
	 */
	echo $this->element('design-head');
?>
		
		<div id="body">
			
<?php
	/**
	 * Load HTML Body
	 */
	echo $content_for_layout . "\n";
?>

		</div>
		
		<div id="foot">
			<div class="wrapper">
				
				<div class="grid-16 links">
					<strong class="cc">(cc) <?php echo date('Y'); ?>, Minicatalogo.cl</strong>
				
					<?php echo $html->link(__('Nosotros', true), array('controller' => 'pages', 'action' => 'display', 'about')); ?>
					<?php //echo $html->link(__('Ayuda', true), array('controller' => 'pages', 'action' => 'display', 'help')); ?>
					<?php //echo $html->link(__('Blog', true), Configure::read('Site.Url.blog')); ?>
					<?php echo $html->link(__('Contacto', true), array('controller' => 'pages', 'action' => 'display', 'contact')); ?> 
					<?php //echo $html->link(__('Diseños', true), array('controller' => 'themes')); ?> 
					<?php //echo $html->link(__('Directorio', true), array('controller' => 'directory')); ?> 
					<?php //echo $html->link(__('Mapa', true), array('controller' => 'map')); ?> 
					
					<?php //echo $html->link(__('Feedback', true), 'http://feedback.minicatalogo.cl'); ?>
					<?php //echo $html->link(__('Soporte', true), array('controller' => 'pages', 'action' => 'display', 'support')); ?>
					<?php echo $html->link(__('Privacidad', true), array('controller' => 'pages', 'action' => 'display', 'privacy-policy')); ?> 
					<?php echo $html->link(__('Política de Contenido', true), array('controller' => 'pages', 'action' => 'display', 'content-policy')); ?> 
					<?php echo $html->link(__('Términos de Servicio', true), array('controller' => 'pages', 'action' => 'display', 'terms-of-service')); ?> 
					<?php //echo $html->link(__('Política de Privacidad', true), array('controller' => 'pages', 'action' => 'display', 'privacy-policy')); ?>
				</div>
				<div class="grid-3 language">
					<?php //echo $form->input('Language', array('type' => 'select', 'options' => array('spa' => __('Español', true), 'eng' => __('Ingles', true)),'div' => false, 'label' => __('Idiomas', true))); ?>
				</div>
				<div class="grid-13 social">
					<ul>
						<li class="rss"><?php echo $html->link(__('RSS', true), array('controller' => 'pages', 'action' => 'display', 'rss')); ?></li>
						<li class="youtube"><?php echo $html->link(__('Youtube', true), 'http://www.youtube.com/minicatalogo', array('target' => '_blank')); ?></li>
						<li class="twitter"><?php echo $html->link(__('Twitter', true), 'http://twitter.com/minicatalogo', array('target' => '_blank')); ?></li>
						<li class="facebook"><?php echo $html->link(__('Facebook', true), 'http://www.facebook.com/pages/MinicatalogoCl/265511750178', array('target' => '_blank')); ?></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<?php echo $this->element('analytics'); ?>

<script type="text/javascript">
	
	jQuery(function($) {
		// Ajax Loading Bar
		$('#loading-bar').hide();
		$('#loading-bar').ajaxStart(function () { $(this).show(); });
		$('#loading-bar').ajaxStop(function () { $(this).hide(); });
		
		var inputs = $('div#box-search input[type="text"]');
		inputs.focus(function(){
			$('label[for="'+$(this).attr('id')+'"]').hide();
		});
		inputs.blur(function(){
			var that = $(this);
			var label = $('label[for="'+that.attr('id')+'"]');
			if (that.val() == ""){
				label.show();
			}
			else {
				label.hide();
			}
		});
		inputs.blur();
		
	    $('a#btn-box-login').click(function() {
			var boxLogin = $('div#box-login');
			
			var bw = $('html').css('width');
			bw = bw.match(/[0-9]+/g);
			
			var hw = $('div#head div.wrapper').css('width');
			hw = hw.match(/[0-9]+/g);
			
			var mr = $('a#btn-box-login').css('margin-right');
			mr = mr.match(/[0-9]+/g);
			
			r = ((bw - hw) / 2) + parseInt(mr);
			
			boxLogin.css('right', r);
	    	boxLogin.toggle();
			$(this).toggleClass('open');
			
			return false;
	    });
		
		$('div#box-login').mouseup(function() {
			return false
		});
		
		$(document).mouseup(function(e) {
			if($(e.target).parent('a#btn-box-login').length==0) {
				$('a#btn-box-login').removeClass('open');
				$('div#box-login').hide();
			}
		});
		
		//$("table tr:even").addClass('even');
	});
	
</script>
</body>
</html>
<?php echo $this->element('sql_dump'); ?>